import Vue from 'vue'
import App from './app.vue'
import { Button, Tab, Tabs, ImagePreview } from 'vant'
import VueRouter from 'vue-router'
import router from '../router/index'
import Vuex from 'vuex'
import createStore from '../store'
import Notification from '@/components/notification'

Vue.use(VueRouter)
Vue.use(Vuex)
Vue.use(Button).use(Tab).use(Tabs)
Vue.use(ImagePreview)
Vue.use(Notification)

const store = createStore()

/**
 * 动态注册vuex模块
 */
// store.registerModule('c', {
//   state: {
//     text: 3
//   }
// });
// store.unregisterModule('c');

const app = new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
Vue.use(app)
